package com.metadata_system.common.db.entity;

import java.util.Date;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Table(name = "md_project")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Project {
    @Id
    private Integer id;

    /**
     * 所属用户
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 所属数据库ID
     */
    @Column(name = "database_id")
    private Integer databaseId;

    /**
     * 所属数据库名称
     */
    @Column(name = "database_name")
    private String databaseName;

    /**
     * 所属类型
     */
    @Column(name = "type")
    private Integer type;

    /**
     * 项目名称
     */
    private String name;

    /**
     * 项目简称
     */
    @Column(name = "short_name")
    private String shortName;

    /**
     * 项目描述
     */
    private String description;



    /**
     * 元数据ID
     */
    @Column(name = "metadata_id")
    private Integer metadataId;

    /**
     * 元数据名称
     */
    @Column(name = "metadata_name")
    private String metadataName;

    /**
     * 数据总量
     */
    @Column(name = "data_total")
    private Integer dataTotal;

    /**
     * 更新时间
     */
    @Column(name = "updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;


    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
}